package me.jessyan.mvparms.demo.di.module.integral;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import me.jessyan.mvparms.demo.mvp.contract.integral.GiftExchangeContract;
import me.jessyan.mvparms.demo.mvp.model.integral.GiftExchangeModel;


@Module
public class GiftExchangeModule {
    private GiftExchangeContract.View view;

    /**
     * 构建GiftExchangeModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public GiftExchangeModule(GiftExchangeContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    GiftExchangeContract.View provideGiftExchangeView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    GiftExchangeContract.Model provideGiftExchangeModel(GiftExchangeModel model) {
        return model;
    }
}